package com.wx.innerclass;

/**
 * 内部类
 * @author wangxun
 * @version 1.0
 * @description: TODO
 * @date 2021/1/6 4:32 下午
 */
public class Outer {
    private int id;
    private String name;
    Outer(int id){
        this.id = id;
    }

    class Inner{
        void say(){
            System.out.println("outer id is "+Outer.this.id);
            System.out.println("outer id is "+Outer.this.name);

        }
    }

    public static void main(String[] args) {
        Outer outer = new Outer(123);
        
        Outer.Inner inner = outer.new Inner();
        inner.say();
    }
}
